import request from "@/utils/request";

export function login(data) {
  console.log(data);
  return request({
    url: "/api/login",
    method: "post",
    data
  });
}

/**
 * 获取短信验证码
 */
export function getSmsCaptcha(phone) {
  return request({
    url: "api/captcha/message?phone=" + phone,
    method: "get"
  });
}

export function getInfo() {
  return request({
    url: "/api/my/info",
    method: "get"
  });
}

export function logout() {
  return request({
    url: "/api/auth/logout",
    method: "post"
  });
}
